<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:wb="http://open.weibo.com/wb" class=" widthauto">
  <head>
    <title>My JSP 'postjudge.jsp' starting page</title>
    <script type="text/javascript" src="../js/jquery-2.0.0.js"></script>
    <script type="text/javascript" src="../js/layer/layer.js"></script>
    <style>
    .scbtn{
    	border: 0;
    	background-color: #3EAFE0;
    	padding: 8px 24px;
    	color: white;
    	border-radius:5px;
    }
    </style>
    <script>
    //获取url后的参数
    function GetQueryString(name){
         var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
         var r = window.location.search.substr(1).match(reg);
         if(r!=null)return  unescape(r[2]); return null;
    }
    
    $(document).ready(function(){
    	//帖子id
    	var pid = GetQueryString("pid");
    
    	$(".scbtn").click(function(){
    		var status = $(".select3").val();
    		//当你在iframe页面关闭自身时
			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			parent.location.href = "PostAction_updatePostStatus.action?pid="+pid+"&status="+status;
			parent.layer.close(index); //再执行关闭   
    	});
    	
    });
    	
    </script>
  </head>
  
  <body>
  <div>
    <label style="float: left;">帖子状态：</label>
	<div class="vocation">
		<select class="select3" name="postStatus">
			<option value="0" selected="selected">未审核</option>
			<option value="1">未通过审核</option>
			<option value="2">通过审核</option>
			<option value="3">加精</option>
		</select>
	</div><br />
	<div>(请选择一种状态)</div><br />
	<div style="text-align: center;">
		<input type="button" value="保存" class="scbtn"/>
	</div>
  </div>
  </body>
</html>
